
import Cookies from 'js-cookie'

const TokenKey = 'vue_admin_template_token' // 存储token

const tokenTime = 'tokenTimekey'

export function setTokenTime() {
  return Cookies.set(tokenTime, Date.now())
}
export function getTime() {
  return Cookies.get(tokenTime)
}

// 从cookies当中取token
export function getToken() {
  return Cookies.get(TokenKey)
}
// 将token存储到cookies当中
export function setToken(token) {
  return Cookies.set(TokenKey, token)
}
// 将token从cookies当中删除
export function removeToken() {
  return Cookies.remove(TokenKey)
}
